import QtQuick 2.0
import QtQuick.Controls 2.12
Button{
    id:normal_btn
    contentItem: Text{
        text: normal_btn.text
        font:normal_btn.font
        opacity: enabled?1.0:0.3 //透明度
        color: normal_btn.down?"#17a81a":"#21be2b" //点击与弹起的颜色
        horizontalAlignment: Text.AlignHCenter//水平居中
        verticalAlignment: Text.AlignVCenter//垂直居中
        elide: Text.ElideRight//右边超出部分变成省略号
    }
    background: Rectangle{
        implicitWidth: 100
        implicitHeight: 40
        opacity: enabled?1:0.3
        border.color: normal_btn.down?"#17a81a":"#21be2b"
        border.width: 1
        radius: 2
    }
}
